package sicnu.cs.ich.api.domain.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 沈洋 邮箱:1845973183@qq.com
 * @create 2021/11/30-14:35
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserInfoForm implements Serializable {
    @Size(min = 4,max = 10,message = "个数必须在4和12之间")
    private String nickname;
    @Max(value = 1)
    @Min(value = 0)
    private Integer gender;
    @Size(max = 128)
    private String signature;
    @Size(max = 256)
    private String introduction;
    private Integer regionId;
    @Size(max = 256)
    private String address;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birth;
}
